# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *

from  trabajos.views import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'congreso.views.home', name='home'),
    # url(r'^congreso/', include('congreso.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),


### Dissertations (Trabajos)
    
    # admin
    (r'^dissertations/admin/', admin.site.urls),

    # principal
    (r'^$', main_page),

    # login/logout
    (r'^login/$', 'django.contrib.auth.views.login', { 'template_name':'login.html' }),
    (r'^logout/$', logout_page),
    
    # trabajos
    (r'^dissertations/$', dissertation_add), #/dissertations/
    (r'^dissertations/list/$', dissertation_list),
    (r'^dissertations/add/$', dissertation_add),
    (r'^dissertations/email/(?P<dissertation_id>\d+)/$', send_mail),
    (r'^dissertations/confirm/$', dissertation_confirm),
    (r'^dissertations/show/(?P<dissertation_id>\d+)/$', dissertation_show),
    (r'^dissertations/get_sub_areas/(?P<area_id>\d+)/$', get_sub_areas),

) # urlpatterns end.
